home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / lib / SeqCltn.h < prev    next >
C/C++ Source or Header  |  1990-05-19  |  2KB  |  56 lines

  1. #ifndef    SEQCLTN_H
  2. #define    SEQCLTN_H
  3.  
  4. /*$Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/lib/RCS/SeqCltn.h,v 3.0 90/05/20 00:21:13 kgorlen Rel $*/
  5.  
  6. /* SeqCltn.h -- declarations for abstract sequential collections
  7.  
  8.     THIS SOFTWARE FITS THE DESCRIPTION IN THE U.S. COPYRIGHT ACT OF A
  9.     "UNITED STATES GOVERNMENT WORK".  IT WAS WRITTEN AS A PART OF THE
  10.     AUTHOR'S OFFICIAL DUTIES AS A GOVERNMENT EMPLOYEE.  THIS MEANS IT
  11.     CANNOT BE COPYRIGHTED.  THIS SOFTWARE IS FREELY AVAILABLE TO THE
  12.     PUBLIC FOR USE WITHOUT A COPYRIGHT NOTICE, AND THERE ARE NO
  13.     RESTRICTIONS ON ITS USE, NOW OR SUBSEQUENTLY.
  14.  
  15. Author:
  16.     K. E. Gorlen
  17.     Computer Systems Laboratory, DCRT
  18.     National Institutes of Health
  19.     Bethesda, MD 20892
  20.  
  21. $Log:    SeqCltn.h,v $
  22.  * Revision 3.0  90/05/20  00:21:13  kgorlen
  23.  * Release for 1st edition.
  24.  * 
  25. */
  26.  
  27. #include "Collection.h"
  28.  
  29. class SeqCltn: public Collection {
  30.     DECLARE_MEMBERS(SeqCltn);
  31. protected:
  32.     SeqCltn();
  33.     void indexRangeErr() const;
  34. public:
  35.     virtual    Object* add(Object&) = 0;
  36.     virtual Object*& at(int) = 0;
  37.     virtual const Object *const& at(int) const = 0;
  38.     virtual void atAllPut(Object& ob) = 0;
  39.     virtual int compare(const Object&) const;
  40.     virtual Object* doNext(Iterator&) const;
  41.     virtual Object* first() const;
  42.     virtual unsigned hash() const;
  43.     virtual bool isEqual(const Object&) const;
  44.     virtual int indexOf(const Object& ob) const;
  45.     virtual int indexOfSubCollection(const SeqCltn& cltn, int start=0) const = 0;
  46.     virtual Object* last() const;
  47.     virtual unsigned occurrencesOf(const Object&) const;
  48.     virtual Object* remove(const Object&) = 0;
  49.     virtual void removeAll() = 0;
  50.     virtual void replaceFrom(int start, int stop, const SeqCltn& replacement, int startAt =0) = 0;
  51.     virtual unsigned size() const = 0;
  52.     virtual const Class* species() const;
  53. };
  54.  
  55. #endif
  56.